<template>
  <div style="max-height:287px">
    <a-table class="h-100" :columns="columns" :data-source="list" :pagination="false" rowKey="sortId" :loading="loading" :scroll="{y: 213}">
      <span slot="violationInfo" slot-scope="text">
        <a-tag color="red">{{text || '无'}}</a-tag>
      </span>

    </a-table>
  </div>
</template>
<script>
export default {
  components: {},
  data() {
    return {
      list: [],
      loading: false,
      columns: [
        { title: '违规风险内容', dataIndex: 'errorWord', ellipsis: true, width: '60%' },
        { title: '出现次数', dataIndex: 'counts', width: '20%'  },
        {
          title: '违规类型',
          dataIndex: 'violationInfo',
          width: '20%',
          scopedSlots: { customRender: 'violationInfo' }
        },
      ],
    };
  },
  props: {},
  methods: {
    createTable(tableData) {
      this.list = tableData;
    },
  },
};
</script>
<style scoped lang="less">
/deep/ .ant-table-tbody > tr > td{
  padding-top: 6px;
  padding-bottom: 6px;
}
/deep/ .ant-spin-container{
  border-bottom: 1px solid #d8dee5;
}
</style>
